Optimal. Leaf size=160 \[ \frac {2 a^2 (5 A+3 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{3 d}+\frac {4 a^2 (2 A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {2 A \sin (c+d x) \sqrt {\sec (c+d x)} \left (a^2 \sec (c+d x)+a^2\right )}{3 d}-\frac {4 a^2 A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.32, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2960, 4018, 3997, 3787, 3771, 2639, 2641} \[ \frac {2 a^2 (5 A+3 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{3 d}+\frac {4 a^2 (2 A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 d}+\frac {2 A \sin (c+d x) \sqrt {\sec (c+d x)} \left (a^2 \sec (c+d x)+a^2\right )}{3 d}-\frac {4 a^2 A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2639
Rule 2641
Rule 2960
Rule 3771
Rule 3787
Rule 3997
Rule 4018
Rubi steps
\begin {align*} \int (a+a \cos (c+d x))^2 (A+B \cos (c+d x)) \sec ^{\frac {5}{2}}(c+d x) \, dx &=\int \frac {(a+a \sec (c+d x))^2 (B+A \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 A \sqrt {\sec (c+d x)} \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{3 d}+\frac {2}{3} \int \frac {(a+a \sec (c+d x)) \left (-\frac {1}{2} a (A-3 B)+\frac {1}{2} a (5 A+3 B) \sec (c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 a^2 (5 A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 A \sqrt {\sec (c+d x)} \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{3 d}+\frac {4}{3} \int \frac {-\frac {3 a^2 A}{2}+\frac {1}{2} a^2 (2 A+3 B) \sec (c+d x)}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 a^2 (5 A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 A \sqrt {\sec (c+d x)} \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{3 d}-\left (2 a^2 A\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (2 a^2 (2 A+3 B)\right ) \int \sqrt {\sec (c+d x)} \, dx\\ &=\frac {2 a^2 (5 A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 A \sqrt {\sec (c+d x)} \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{3 d}-\left (2 a^2 A \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{3} \left (2 a^2 (2 A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {4 a^2 A \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {4 a^2 (2 A+3 B) \sqrt {\cos (c+d x)} F\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a^2 (5 A+3 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 A \sqrt {\sec (c+d x)} \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 2.28, size = 279, normalized size = 1.74 \[ \frac {a^2 (\cos (c+d x)+1)^2 \sec ^4\left (\frac {1}{2} (c+d x)\right ) \left (\sqrt {\sec (c+d x)} (3 \csc (c) \cos (d x) (4 A-B \cos (2 c)+B)+2 A \tan (c+d x)+6 B \cos (c) \sin (d x))-\frac {4 i \sqrt {2} e^{-i d x} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \left (e^{i d x} \left (\left (-1+e^{2 i c}\right ) (2 A+3 B) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};-e^{2 i (c+d x)}\right )+A e^{i (c+d x)} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i (c+d x)}\right )\right )+3 A e^{i c} \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};-e^{2 i (c+d x)}\right )\right )}{-1+e^{2 i c}}\right )}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.97, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (B a^{2} \cos \left (d x + c\right )^{3} + {\left (A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} + {\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right ) + A a^{2}\right )} \sec \left (d x + c\right )^{\frac {5}{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \cos \left (d x + c\right ) + A\right )} {\left (a \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {5}{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.62, size = 513, normalized size = 3.21 \[ -\frac {4 \left (6 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (2 A +B \right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (7 A +3 B \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \left (2 A \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 A \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 B \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+3 A \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \EllipticF \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a^{2}}{3 \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right )^{\frac {3}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \cos \left (d x + c\right ) + A\right )} {\left (a \cos \left (d x + c\right ) + a\right )}^{2} \sec \left (d x + c\right )^{\frac {5}{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2 \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________